package com.hmdp.ThreadUtil;/**
 * @Author:fengxiaohui
 * @Description:
 * @Date:Create in 10:04 上午 2023/6/10
 * @Modified By:
 */

import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.TimeUnit;

/**
 *@Author:fengxiaohui
 *@Description:
 *@Date:Create in 10:04 上午 2023/6/10
 *@Modified By:
 */
@Slf4j(topic = "cpu")
public class getCpuAlived {

    public static void main(String[] args) throws InterruptedException {
        log.debug("我要开始工作了，{}",System.currentTimeMillis());
        //获取当前CPU核心数，本机是8核
        TimeUnit.SECONDS.sleep(5);
        log.debug("本机CPU核心数 :{}",Runtime.getRuntime().availableProcessors());
    }
}
